package com.midian.action.mc.activity;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.midian.action.mc.common.AjaxAction;
import com.midian.common.annotation.FunctionAnnotationOverride;
import com.midian.model.activity.ActivityType;
import com.midian.service.activity.IActivityTypeService;

/**
 * 活动类型Action
 * @author Mengfh
 *
 */
@Scope("prototype")
@Controller("activityTypeAction")
@FunctionAnnotationOverride(isAction = true, auth = "活动类型管理")
public class ActivityTypeAction extends AjaxAction<ActivityType> {
	/**活动类型实体*/
	private ActivityType entity;
	/**活动类型实体列表*/
	private List<ActivityType> rows;
	/**活动类型业务*/
	private IActivityTypeService activityTypeService;
	
	public ActivityType getEntity() {
		return entity;
	}
	public void setEntity(ActivityType entity) {
		this.entity = entity;
	}
	@Resource(name = "activityTypeService")
	public void setActivityTypeService(IActivityTypeService activityTypeService) {
		this.service = activityTypeService;
		this.activityTypeService = activityTypeService;
	}
	@Override
	protected ActivityType dytEntity() {
		if(this.entity == null) {
			this.entity = new ActivityType();
		}
		return getEntity();
	}
	@Override
	protected void dyEntity(ActivityType t) {
		setEntity(t);
	}
	@Override
	public void setRows(List<ActivityType> rows) {
		this.rows = rows;
	}
	@Override
	public List<ActivityType> getRows() {
		return rows;
	}
}
